#define _CRT_SECURE_NO_WARNINGS
#include<vector>
#include<string>
#include<iostream>
using namespace std;
int main()
{
	string buffer;
	vector<string> ret;
	char ch;
	while ((ch = getchar()) != '\n')
	{
		if (ch == '"')
		{
			while ((ch = getchar()) != '"')
				buffer += ch;
			ch = getchar();
			ret.push_back(buffer);
			//cout<<"1:"<<buffer<<endl;
			buffer.clear();
		}
		else
		{
			buffer += ch;
			while ((ch = getchar()) != ' ' && ch != '\n')
				buffer += ch;
			ret.push_back(buffer);
			//cout<<"2:"<<buffer<<endl;
			buffer.clear();
		}
		if (ch == '\n')
			break;
	}
	cout << ret.size() << endl;
	for (auto& e : ret)
	{
		cout << e << endl;
	}
	return 0;
}
